package com.goodmean.common.Directive;

import com.jfinal.template.Directive;
import com.jfinal.template.Env;
import com.jfinal.template.io.Writer;
import com.jfinal.template.stat.Scope;

import java.sql.Timestamp;

/**整个项目的模板中输出时间
 * **/
public class DateDirective extends Directive {
    @Override
    public void exec(Env env, Scope scope, Writer writer) {
        write(writer , new Timestamp(System.currentTimeMillis()).toString().substring(0 , 10));
    }
}
